import { Form, Config } from "form.slint";
import { Alter } from "alter.slint";

export global Confirm {
    callback confirm(Config);
}

export component App inherits Window {
    in-out property <bool> open: false;
    in-out property <bool> btn-open: false;
    in property <string> message;

    width: 800px;
    height: 800px;
    title: "sql2doc";
    icon: @image-url("icon.png");
    Form {
        confirm(config) => {
            Confirm.confirm(config);
        }
    }

    Alter {
        visible: open;
        message: message;
        btn-open: btn-open;
        cancel => {
            root.btn_open = false;
            root.open = false;
        }
    }
}
